<html>
<head>
    <script src="__JS__/jquery.min.js" type="text/javascript"></script>
    <script>
        this.scrollHeight - 200 <= $(this).scrollTop() + $(this).height();
    </script>
</head>
<body>
<div>下拉加载更多</div>
<div class="main" style="height:700px;overflow:auto;">
    {foreach name="results" item="result"}
    <div class="child">
        <a href="{:url('index/index/detail',['id'=>$result['id']])}" target="_blank">
            <img src="{$result.thumb}" alt="">
            <h2>{$result.title}</h2>
            <h3>模特:{$result.author}</h3>
        </a>
    </div>
    {/foreach}
</div>
</body>
<script  type="text/javascript">
    $(document).ready(function(){
        $(".main").unbind("scroll").bind("scroll", function(e){
            var sum = this.scrollHeight;
            if (sum <= $(this).scrollTop() + $(this).height()) {
                $(".main").append($(".child").clone());
            }
        });
    });
</script>
</html>
